How to solve a quadratic by completing the square